//===================================
//File: ShowCase.cpp
//ShowCase functions
//Name: Lapin R.D.
//Date: 20.05.12, v.1.0
//===================================
#include "Showcase.h"

using namespace std;

unsigned int ShowCase::count=0;
unsigned int ShowCase::count_all=0;
//---------------------------------------------------------------------------


ShowCase::ShowCase()
{
	count_all++;
    id=count_all;
	count++;
	tl = Point(0,0,1);
	w=0;
	h=0;
};

ShowCase::ShowCase(Point tl,int w,int h)
{
	count_all++;
    id=count_all;
	count++;
 //cout << "\nShowCase():\n";
 this->tl = tl;
 this->w = w;
 this->h = h;
 //cout << "ShowCase()\n";
};

ShowCase::~ShowCase()
{
	//cout << "\n~ShowCase:\n";
	//cout << "~ShowCase\n";
};

//Вывод на экран
void ShowCase::write() {
    cout << "Planshet ID: "<<id<<endl;
	cout << "TopLeft point = " << tl << endl;
	cout << "Width =" << w << " Height =" << h << endl;
}

void ShowCase::moveSTo (Point p)
{
	tl.moveToPoint(p);

};

void ShowCase::moveSTodXdY (double x, double y)
	{

	tl.moveTodXdY(x,y);
};

void ShowCase::consSS (Point p)
	{

		tl.consSP(p);
	};

//---------------------------------------------------------------------------
const unsigned int ShowCase::getID()
{
  return id;
};
//---------------------------------------------------------------------------
unsigned int ShowCase::countObject()
{
  return count; 
};

int ShowCase::getWidth()
{
	return w;	
}
int ShowCase::getHeight()
{
	return h;	
}
Point ShowCase::getPoint()
{
	return tl;
}
